<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/mobile/annManager.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
		}
	});
})

this.imagePreview = function(){	
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("table").append("<div id='preview'><img src='"+ this.rel +"' alt='Image preview' />"+ c +"</div>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	imagePreview();
});
</script>
<style>
	*{margin:0;padding:0;list-style-type:none;}
	img,a{border:0;}
	.piccon{height:75px;margin:100px 0 0 50px;}
	.piccon li{float:left;padding:0 10px;}
	#preview{position:absolute;border:1px solid #ccc;background:#333;padding:5px;display:none;color:#fff;}
</style>
<div class="widget" style="margin:0px;">
	<form id="editForm">
		<table class="table table-bordered" style="width:100%; text-align:left;">
			<tr>
				<td class="table-left" style="width:80px;">申请机构:</td>
				<td>${(ann.on)!''}</td>
			</tr>
			<tr>
				<td class="table-left" style="width:80px;">申请人：</td>
				<td>${(ann.cuname)!''}</td>
			</tr>
			<tr>
				<td class="table-left">标题:</td>
				<td>${(ann.title)!''}</td>
				<input type="hidden" id="ann_code" value="${(ann.code)!''}"/>
			</tr>
			<tr>
				<#if ann.status == 3>
					<td class="table-left">备注</td>
					<td><textarea id="remark" name="remark">${(ann.remark)!''}</textarea></td>
				<#elseif ann.status == 2>
				<#else>
					<td class="table-left">备注</td>	
					<td><textarea id="remark" name="remark" placeholder="驳回的话请你填写原因"></textarea></td>
				</#if>
			</tr>
			<tr>
				<td> 内 容&nbsp;</td>
				<td><a class="preview">${(ann.content)!''}</a></td>
			</tr>
			<#if ann.uc??>
			<tr>
				<td colspan="2" style="text-align:center; color: red">已审核</td>
			</tr>
			<tr>
				<td colspan="2" style="text-align:center;"><a class="btn btn-info" href="javascript:;" onclick="javascript: sys_load_handle('annManager');">关闭</a></td>
			</tr>
			<#else>
			<tr>
				<td colspan="5" style="text-align:center;">
					<a class="btn btn-info" href="javascript:;" title="${(ann.title)!''}" pic="${(ann.code)!''}" onclick="javascript: updateDesignate1_annManager($('#ann_code').val()); sys_load_handle('annManager');"><i class="fontello-icon-floppy"></i> 通过</a>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<a class="btn btn-info" href="javascript:;" onmousemove="javascript:check_annManager();" title="${(ann.title)!''}" pic="${(ann.code)!''}" onclick="javascript: updateDesignate2_annManager($('#ann_code').val()); sys_load_handle('annManager');"><i class="fontello-icon-floppy"></i> 驳回</a>
				</td>
			</tr>
			</#if>
		</table>
	</form>
</div>

